#define _CRT_SECURE_NO_WARNINGS 1

#include"h.cpp"

int main()
{
	double a, b;
	char ch = '0';
	next:
	scanf("%lf", &a);
	while (1)
	{
		scanf("%c", &ch);
	    if (ch == 'C')
		{
			goto next;
		}
		scanf("%lf", &b);
		getchar();
		if (ch == '+')
		{
			double c = a;
			a = add(a, ch, b);
			printf("%lf %c %lf = %lf", c, ch, b, a);
		}
		else if(ch == '-')
		{
			double c = a;
			a = diff(a, ch, b);
			printf("%lf %c %lf = %lf", c, ch, b, a);
		}
		else if (ch == '*')
		{
			double c = a;
			a = mult(a, ch, b);
			printf("%lf %c %lf = %lf", c, ch, b, a);
		}
		else if (ch == '/')
		{
			double c = a;
			a = divid(a, ch, b);
			printf("%lf %c %lf = %lf", c, ch, b, a);
		}
		else if (ch == '=')
		{
			printf("%lf = %lf", a, a);
		}
	}
	return 0;
}